<style lang='less'>

</style>

<template>
  <div>
    <Modal
      v-model="mshow"
      title="高拍仪" @on-visible-change="modalChange">
      <height-camera :isOpen="openNow" @ret-fun="retFun"></height-camera>
    </Modal>
    <Button type="primary" @click="TakePhoto">打开高拍仪</Button>
    <Divider>呦呦切克闹1</Divider>
    <Card style="width:500px" v-show="cardShow">
      <p slot="title">
        <Icon type="ios-film-outline"></Icon>
        服务器返回的信息
      </p>
      {{serverResult}}
    </Card>
  </div>
</template>

<script>
import HeightCamera from '_c/height-camera'
export default {
  components: {
    HeightCamera
  },
  data () {
    return {
      mshow: false,
      openNow: false,
      cardShow: false,
      modal_loading: false,
      serverResult: ''
    }
  },
  methods: {
    TakePhoto () {
      this.mshow = true
      this.openNow = true
    },
    modalChange (e) {
      this.openNow = e
    },
    retFun (data) {
      this.cardShow = true
      this.serverResult = JSON.stringify(data)
    }
  },
  mounted () {
    if (!window.WebSocket) {
      alert('浏览器不支持HTML5,请更新浏览器或者使用其它浏览器')
    }
    // var obj = document.getElementById('CameraCtl')
    // Cam_ControlInit(obj, 0, 0, 600, 400, this.GetDevCountAndNameResultCB)
  }
}
</script>

<style>

</style>
